home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Java Starter Kit
/
The Java Starter Kit (ISBN 1-57521-097-5D)(Cafe Lite and Symantec)(1996).ISO
/
cafelite
/
readme.txt
< prev
next >
Wrap
Text File
|
1996-01-29
|
17KB
|
427 lines
README for Symantec CafΘ Lite
=================================================================
Copyright (c) 1996 by Symantec Corporation. All Rights Reserved.
ABOUT THE "README.TXT" FILE
=================================================================
This file provides essential information on installing and using
Symantec CafΘ Lite.
[To print this file from Notepad on NT 3.51, please change the
default fixed font (do Edit | Set Font) to any regular 12-pt. font,
such as MS Serif or Arial. The default font is not a problem in
Windows 95 Notepad or WordPad.]
The sections are as follows:
* What is Symantec CafΘ Lite?
* What You Need
* Installing Symantec CafΘ Lite
* Building and Using Java Projects
- Using the Java Demos
- Using AppExpress
- Generating New Projects Manually
- Running Java Applets and Applications
- Organizing Your Java Projects
* Important Points, Tips, and Workarounds
* Documentation
* Where to Go from Here
* Differences Between Java Beta 1 and Beta 2
WHAT IS SYMANTEC CAF╔ LITE ?
=================================================================
Symantec CafΘ Lite is a set of tools that allow Windows developers
to edit, build, run, and debug Java applications within the
Symantec Integrated Development and Debugging Environment, on
Windows 95 and Windows NT 3.51. This version supports Sun
Microsystems Java Release 1.0.
This product includes all elements necessary to build Java applets
and stand-alone applications, but is a subset of the full version
of Symantec CafΘ. The full version also includes a Class Editor,
Hierarchy Editor, a Visual Debugger, and more.
Get complete information on the full version at
http://www.symantec.com/lit/dev/javaindex.html
This is a special early-release version of the product.
Please read the limitations in "Important Points, Tips, and
Workarounds" below, and send any comments you have, or
requests for more information, to javainfo@symantec.com.
WHAT YOU NEED
=================================================================
* An IBM Personal Computer or 100-percent compatible
* 16MB RAM
* Windows 95 or Windows NT 3.51
* CD-ROM Drive
* 25-60 MB free hard disk space, depending on cluster size
INSTALLING SYMANTEC CAF╔ LITE
=================================================================
With the Symantec CafΘ Lite CD in your CD-ROM drive,
run [d]:\setup.exe -- where [d] is the drive letter for your
CD-ROM drive.
The install wizard will guide you through the simple installation;
just use the Next button to move forward through the steps.
If you do not specify another location, the installer will install
Symantec CafΘ Lite into C:\Cafe.
Installation onto your hard drive will take from 2 to 8 minutes,
depending on the speed of your system.
When the completion dialog appears, press OK to restart and
allow the necessary changes to take effect. (On Windows 95,
the changes are in C:\autoexec,bat; on Windows NT, see
Control Panel | System.)
Note: to uninstall Symantec CafΘ Lite,
on Windows 95, use the Add/Remove Programs control panel;
on Windows NT, run the uninstall icon in the Symantec CafΘ Lite
program group.
Note that Uninstall will not remove any files created in the
Cafe tree after installation -- i.e., sample projects, etc.
Also, Uninstall does not remove the Program Group.
BUILDING AND USING JAVA PROJECTS
=================================================================
We suggest that you start by using and examining one of the
demo projects. The section below uses the ArcTest project as
an illustration. Later, you can use AppExpress to generate
new Java applications, or generate projects manually.
Using the Java Demos
-----------------------------------------------------------------
Launch Symantec CafΘ Lite
on Windows 95, from the Start | Programs menu;
on Windows NT, from the Symantec CafΘ Lite program icon.
You'll see the Symantec CafΘ Lite startup screen.
Choose Project | Open
Open the ArcTest demo project, located in
Cafe\java\demo\ArcTest and named arctest.prj.
Choose Project | Rebuild All
The Java compiler will start up, process the ArcTest.java source
file, and produce the runtime class file ArcTest.class and some
additional classes in the ArcTest directory.
Choose Project | Execute Program
After a brief pause, the ArcTest applet will appear and run.
Note:
The first time you a run a Java application after installing,
you will see an initial copyright notice from Sun Microsystems.
To accept the terms and use the Java software on your computer,
click on Accept.
==> Also please read Running Java Applets and Applications, below.
Using AppExpress
-----------------------------------------------------------------
In Symantec CafΘ Lite, AppExpress offers three application types:
Java Applet, Java SDI, and Java Console. These are extremely
simple examples to demonstrate Java applications.
This is how to create new simple Java projects using AppExpress:
Choose Project | New
You may fill in a project name or leave it blank, in which case
AppExpress will later assign a default name. Select a directory,
check 'Use AppExpress' and click Finish.
Generate an application
On The AppExpress main dialog select one of the three Java
application types and click Finish.
Build and execute program as in Using the Java Demos, above.
Please note the following limitation:
In Symantec CafΘ Lite, the AppExpress names are preassigned,
and everything has the same name: "Simple." (The file Simple.java
contains the class Simple.)
You can name the project whatever you like (the default project
name is - you guessed it - "Simple"), but you can't edit the
class names or file names within AppExpress.
==> Also please read Running Java Applets and Applications, below.
Generating New Projects Manually
-----------------------------------------------------------------
If you have existing Java source code, or you are writing some,
you can use ProjectExpress to generate your own projects manually;
just specify either Applet or Console. A "Console" app is a Java
stand-alone application, which may be either a true console (such
as the AppExpress Java Console example) or a graphical windowing
application (such as the AppExpress Java SDI example).
The Java source files (.java) contain the source code for your
Java classes. At build time, the compiler produces a Java class
file (.class) with the same basename as the source file.
If your project is of type Applet, you need to write the HTML file
to invoke your applet. See the demo projects for examples.
The .html file supplies the link that allows your Java applet to
be launched and debugged within the Symantec IDDE.
==> Also please read Running Java Applets and Applications, below.
==> Running Java Applets and Applications
-----------------------------------------------------------------
Background information:
Java applets are called from Hypertext links, such as links in
internet Web pages. The links are written in editable text using
the Hypertext Markup Language (HTML).
Java applets such as ArcTest are invoked by running appletviewer.exe
on an HTML file. (Appletviewer then runs the Java interpreter on
the class file specified in the .html file.)
In the ArcTest project, if you open example1.html in the editor,
you can see the format for invoking an applet from an HTML file.
Java stand-alone applications such as the AppExpress Java Console
or Java SDI are invoked by running java.exe (the Java interpreter)
on a .class file.
When you choose Execute Program in Symantec CafΘ Lite:
If the project is of type Applet, the Symantec Environment runs
appletviewer on the HTML file specified in the Project Arguments
dialog, or if the project arguments field is empty, on the
basename of the current project plus the extension .html.
If the project is of type Console (Java stand-alone application),
the Symantec Environment runs the Java interpreter on the class
file specified in the Project Arguments dialog. The default entry
in Project Arguments is the basename of the current project.
If your project does not conform to the above default naming,
simply edit the Project | Arguments field as appropriate.
==> Also see Organizing Your Java Projects, below, for runtime
considerations involving CLASSPATH.
Organizing Your Java Projects
-----------------------------------------------------------------
Background information:
In java the package statement is used to organize your source
(*.java) and class (*.class) files. The compiler, the interpreter,
and the appletviewer can then use this organization to find files.
The package statement in a java source file indicates that all of
the classes in that file make up part of the package.
The import statement is used to access classes that are defined
in other files.
In order to use the package and import statements, your files must
be located properly on your drive. The easiest way to make sure
of this is to organize your project's files as follows.
1. In the project directory place source files that have no
package statement.
2. For source files that contain a package statement, build a
directory structure under the project directory that mirrors the
structure of the package name. So for a source file containing
the statement
package COM.Symantec.Alebach;
create the directory structure COM\Symantec\Alebach under the
project directory. Then place the source file in the directory
Alebach.
This should be sufficient for most projects. If you need to do
something different, please continue reading.
The general principle is that a java source file with a package
statement must go in a directory structure matching the package
name. So the file containing
package COM.Symantec.Alebach;
must be in the directory COM\Symantec\Alebach.
Now, in a default installation, this directory structure can be
rooted either in the project directory, or in C:\Cafe\java\lib. The
reason is simply that the default CLASSPATH is .;C:\Cafe\java\lib .
So if the project directory is C:\dev\myproj, and foobar.java
contains the above package statement, valid default locations are
C:\dev\myproj\COM\Symantec\Alebach\foobar.java
C:\Cafe\java\lib\COM\Symantec\Alebach\foobar.java
If you want COM\Symantec\Alebach rooted in a different directory,
you simply need to add that other directory to the classpath for
this project: state the full classpath in the Class Path field in
Project | Settings | Directories. So if you wanted to use C:\temp
as a root you would place the following string in Class Path:
.;C:\Cafe\java\lib;C:\temp
(This passes a command-line switch that overrides the environment
setting of CLASSPATH. Thus you need to restate the full classpath,
not simply the additional directory.)
For a more complete description of the package and import
statements and their association with CLASSPATH, please refer
to the Java Language Specification., Section 5.
==> Runtime implications for .class files: Not surprisingly, the
same restrictions on location apply to .class files as to their
source files. The default behavior of the compiler is to put its
output (.class) files in the same directory as the source files.
If this is the case, then given the instructions above, everything
will work.
However, if the compiler is given a different output directory,
it will root the correct directory structure for the .class files
in that specified output directory, BUT that directory is not
automatically added to the CLASSPATH. You have to restate the
classpath with the additional root directory just as was discussed
above, into Project | Settings | Directories: Class Path.
IMPORTANT POINTS, LIMITATIONS, TIPS, AND WORKAROUNDS
=================================================================
Symantec CafΘ Lite requires you to run under either Windows 95 or
Windows NT 3.51.
File names and class names must be identical in spelling and CASE.
This is a requirement of the Java compiler and interpreter.
The applet class specified inside the .html file must be identical
in spelling and CASE to the class name in the .java file.
There is currently no graphical debugger for Java. When you choose
"Start/Restart Debugging" the IDDE launches the Sun command-line
debugger.
If you attempt to debug, you MUST have TCP/IP installed.
If not, the Sun command-line debugger will hang.
Symantec CafΘ Lite projects must not have names containing spaces.
The Java compiler currently will not run from a WIN95 shared
drive. The symptom is the same as if CLASSPATH were not set
(i.e., compiler complains that it can't find the classes). This
problem is under investigation and we hope to have a fix soon.
Symantec CafΘ Lite can be run from a Netware volume.
Some of the Sun Demo programs using sound are not well behaved
if you are running a machine that does not have a sound card.
You may have to use Ctrl-Alt-Delete to terminate a misbehaving
java applet if this happens.
AppExpress
-----------------------------------------------------------------
The Java SDI sample is not fully functional. Only the menu items
Help | About and File | Exit have complete code behind them. The
file open and save-as dialogs do not function correctly at this
time.
Compiler support
-----------------------------------------------------------------
The compiler does not accurately report the number of lines compiled.
Certain Java compiler switches are not currently supported in the
IDDE. For more information you may want to run the Java compiler,
javac.exe, directly from the command line.
Earlier versions of Java
-----------------------------------------------------------------
Earlier Java releases from Sun have different class names and
functionality in comparison with the current release. For more
information please refer to Sun's http site at http://java.sun.com.
DOCUMENTATION
=================================================================
The folder Sun Docs on the CD contains the latest Java
documentation available from Sun when this CD was mastered.
The most up-to-date Java documentation is always available at
Sun's web site.
Most of the files are in HTML and can be viewed with your favorite
browser, such as CyberJack or NetScape. This includes the current
API and Programmer's Guide. The Java Language specification is
provided as a postscript file. It can be printed on any PostScript
printer or viewed with utilities such as GhostScript.
WHERE TO GO FROM HERE
=================================================================
There is a host of information available at http://java.sun.com.
Visit us at Java Central:
http://www.symantec.com/lit/dev/javaindex.html
For additional information about Symantec Java support,
please contact javainfo@Symantec.com.
DIFFERENCES BETWEEN SUN JAVA BETA1 AND BETA 2
=================================================================
Symantec CafΘ Lite supports Sun's Java 1.0 release including
the final Java 1.0 API. This API is compatible with Netscape 2.0
Beta 4 and later versions.
There is now an empty finalize() method in Object.
The definition of clone in Object is now as follows:
protected native Object clone() throws CloneNotSupportedException;
Thus if a class has not implemented the interface Clonable, a call
to clone will fail and give the error CloneNotSupportedException.
Errors previously reported as warnings are now errors, and must be
handled in your code.
The meaning of the 'protected' modifier has changed slightly.
Contravariant return types are not supported. Overriding methods
must have the same return type as the overridden method.
Loading classes from zip files is now supported by both the
compiler and the runtime class loader.
There have been several bug fixes, security improvements and API
changes since the BETA 1 release.
All of these changes are described more completely at Sun's web
site: http//java.sun.com/JDK-beta2/changes.html.